//#include rfm

(function() {

/**
 * Array utility object
 */
rfm.Array = {
    /**
     * Filters an enumerable down to only its unique items
     * @param {Array} A collection (can be any Array-like object that has a length property and supports 0-based indexing)
     * @returns {Array} A collection of the unique items that were in the enumerable
     */
    distinct: function(enumerable) {
	    var result = [],
		    contained,
		    item,
		    i,
		    j,
		    k;
	    for (i = 0, j = enumerable.length; i < j; i++) {
		    contained = false;
		    item = enumerable[i];
		    for (k = result.length - 1; k > -1; k--) {
			    if (item === result[k]) {
				    contained = true;
				    break;
			    }
		    }
		    if (!contained) {
			    result.push(item);
		    }
	    }
	    return result;
    }
};

})();